from socket import *

# 创建socket套接字
tcpClientSocket = socket(AF_INET, SOCK_STREAM)

# 链接服务器
serviceAddr = ("192.168.131.58", 7788)
tcpClientSocket.connect(serviceAddr)

# 输入要发送的内容
sendData = "halo from client"

tcpClientSocket.send(sendData.encode('gb2312'))

recvData = tcpClientSocket.recv(1024)
print(recvData.decode('gb2312'))


tcpClientSocket.close()
